import { get } from "../util/request";

// 获取商品列表
export const reqProducts = () => get("/api/v1/products");

// 根据id获取详情
export const reqProductsDetail = (id) => get("/api/v1/products/" + id);

//获取商品分类列表
export const getcategories = () => get("/api/v1/product_categories");

//获取商品列表，页数，上拉加载
export const getproducts = (page = 1, product_category = "", name = "") =>
  get("/api/v1/products", { page, product_category, name });
